import request from '@/utils/request'

/**
 * 获取用户的消息通知
 * @returns {Promise} 返回用户的消息通知列表
 */
export function getMessageNotifications() {
  return request({
    url: '/messageNotification/getHelp',
    method: 'get'
  })
}

/**
 * 处理求救消息
 * @param {String} id 消息ID
 * @returns {Promise}
 */
export function processAlert(id) {
  return request({
    url: '/messageNotification/read',
    method: 'get',
    params: {
      id: id
    }
  })
}

/**
 * 标记消息为已读
 * @param {String} id 消息ID
 * @returns {Promise}
 */
export function markAsRead(id) {
  return request({
    url: `/messageNotification/read/${id}`,
    method: 'put'
  })
} 